package com.xdcplus.web.common.enums.base;

/**
 * 物料单位
 * @author Fish.Fei
 */

public enum BaseMtrlUnitEnum {
    M("M", "米[m]"),
    KM("KM", "千米[km]"),
    KG("KG", "千克[kg]"),
    G("G", "克[g]"),
    PCS("PCS", "片[PCS]"),
    ;

    private String code;

    private String msg;

    public static String getMsg(String code) {
        for (BaseMtrlUnitEnum ele : values()) {
            if(ele.getCode().equals(code)) {return ele.getMsg();}
        }
        return null;
    }

    BaseMtrlUnitEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
